package deepclone.stringconcat;

import java.util.Date;

public class StringTest {

	private String fId;

    private String fContent;

    private String fCreateUserid;

    private String fCreateUserNickname;

    private String fCreateUserPicture;

    private Date fCrdate;

    private Date fChdate;

    private Integer fCommentObjType;

    private String fCommentObjId;

    private String fCommentObjOwnerId;

    private String fParentCommentId;

    private String fReplyCommentId;

    private String fReplyCommentOwnerId;

    private String fReplyCommentOwnerNickname;

    private String fReplyCommentOwnerPicture;

    private Integer fReplyNum;

    private Integer fLikeNum;

    private String fPopularity;
    
    private Long fCheckTime;

    private Integer fCheckStatus;

    private String fCheckFailReason;

    private Integer fIsDelete;

    private Integer fIsReport;

    private Integer fSensitiveWordFilterResult;

    private Integer source;

    private String fPictureContent; 
	
    
    
    
	public String toString1() {
		return "StringTest [fId=" + fId + ", fContent=" + fContent + ", fCreateUserid=" + fCreateUserid
				+ ", fCreateUserNickname=" + fCreateUserNickname + ", fCreateUserPicture=" + fCreateUserPicture
				+ ", fCrdate=" + fCrdate + ", fChdate=" + fChdate + ", fCommentObjType=" + fCommentObjType
				+ ", fCommentObjId=" + fCommentObjId + ", fCommentObjOwnerId=" + fCommentObjOwnerId
				+ ", fParentCommentId=" + fParentCommentId + ", fReplyCommentId=" + fReplyCommentId
				+ ", fReplyCommentOwnerId=" + fReplyCommentOwnerId + ", fReplyCommentOwnerNickname="
				+ fReplyCommentOwnerNickname + ", fReplyCommentOwnerPicture=" + fReplyCommentOwnerPicture
				+ ", fReplyNum=" + fReplyNum + ", fLikeNum=" + fLikeNum + ", fPopularity=" + fPopularity
				+ ", fCheckTime=" + fCheckTime + ", fCheckStatus=" + fCheckStatus + ", fCheckFailReason="
				+ fCheckFailReason + ", fIsDelete=" + fIsDelete + ", fIsReport=" + fIsReport
				+ ", fSensitiveWordFilterResult=" + fSensitiveWordFilterResult + ", source=" + source
				+ ", fPictureContent=" + fPictureContent + "]";
	}

	public String toString2() {
        StringBuilder sb = new StringBuilder();
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fId=").append(fId);
        sb.append(", fContent=").append(fContent);
        sb.append(", fCreateUserid=").append(fCreateUserid);
        sb.append(", fCreateUserNickname=").append(fCreateUserNickname);
        sb.append(", fCreateUserPicture=").append(fCreateUserPicture);
        sb.append(", fCrdate=").append(fCrdate);
        sb.append(", fChdate=").append(fChdate);
        sb.append(", fCommentObjType=").append(fCommentObjType);
        sb.append(", fCommentObjId=").append(fCommentObjId);
        sb.append(", fCommentObjOwnerId=").append(fCommentObjOwnerId);
        sb.append(", fParentCommentId=").append(fParentCommentId);
        sb.append(", fReplyCommentId=").append(fReplyCommentId);
        sb.append(", fReplyCommentOwnerId=").append(fReplyCommentOwnerId);
        sb.append(", fReplyCommentOwnerNickname=").append(fReplyCommentOwnerNickname);
        sb.append(", fReplyCommentOwnerPicture=").append(fReplyCommentOwnerPicture);
        sb.append(", fReplyNum=").append(fReplyNum);
        sb.append(", fLikeNum=").append(fLikeNum);
        sb.append(", fPopularity=").append(fPopularity);
        sb.append(", fCheckStatus=").append(fCheckStatus);
        sb.append(", fCheckFailReason=").append(fCheckFailReason);
        sb.append(", fIsDelete=").append(fIsDelete);
        sb.append(", fIsReport=").append(fIsReport);
        sb.append(", fSensitiveWordFilterResult=").append(fSensitiveWordFilterResult);
        sb.append(", source=").append(source);
        sb.append(", fPictureContent=").append(fPictureContent);
        sb.append("]");
        return sb.toString();
    }

	public final static String method1(String userid) {
		StringBuilder sb = new StringBuilder();
		sb.append("daily_comment_or_topic_times");
		sb.append("_");
		sb.append(userid);
		return sb.toString();
	}

	public final static String method2(String userid) {
		String str = "daily_comment_or_topic_times" + "_" + userid;
		return str;
	}

	public static void main(String[] args) {
		StringTest st = new StringTest();
		int len = 100000;
		long begin = System.currentTimeMillis();
		for (int i = 0; i < len; i++) {
			//method1("12");
			st.toString1();
		}
		long end = System.currentTimeMillis();
		System.out.println(end - begin);

		long begin1 = System.currentTimeMillis();
		for (int i = 0; i < len; i++) {
			//method2("12");
			st.toString2();
		}
		long end1 = System.currentTimeMillis();
		System.out.println(end1 - begin1);
	}
}
